package com.ruoyi.produce.process.scheduling.service;

import com.ruoyi.machine.base.device.domain.Device;
import com.ruoyi.produce.base.bom.domain.ProductionMachine;
import com.ruoyi.produce.process.scheduling.domain.MachineScheduling;

import java.util.List;

public interface IMachineSchedulingService {
    /**
     * 查询所有设备的排产记录
     * @param machineScheduling
     * @return
     */
    List<MachineScheduling> selectMachineSchedulingList(MachineScheduling machineScheduling);
    /**
     * 根据设备查询其排产记录
     * @param machineId
     * @return
     */
    List<MachineScheduling> selectMachineSchedulingListByMachineId(String machineId);

//    /**
//     * 新增
//     * @param machineScheduling
//     * @return
//     */
//    int insertMachineScheduling(MachineScheduling machineScheduling);

    /**
     * 修改
     * @param machineScheduling
     * @return
     */
    int updateMachineScheduling(MachineScheduling machineScheduling);

    /**
     * 删除
     * @param machineScheduling
     * @return
     */
    int deleteMachineScheduling(MachineScheduling machineScheduling);

    /**
     * 自动排产
     * @param worksheetIds
     * @return
     */
    List<MachineScheduling> automaticScheduling(String[] worksheetIds);

    /**
     * 确认排产
     * @param machineSchedulingList
     * @return
     */
    int confirmScheduling(List<MachineScheduling> machineSchedulingList);

    /**
     * 根据加工单编号查询该加工单可以下放的设备
     * @param workSheetId
     * @return
     */
    List<ProductionMachine> searchMachineByWorkSheetId(String workSheetId);
}
